The present invention relates to forms displayed on computing systems. In particular, the present invention relates to the layout of elements in these forms.
In computerized systems, forms are used to provide a graphical user interface that allows users to type in text, select entries, and control operation of an application by manipulating displayed controls. Designing such forms involves placing controls, such as text boxes, check boxes, combo boxes, buttons, and labels on the form and programming the operations of each control.
Many of the controls include text. For example, a button may have the word “Cancel” on it and a label may have the text “Topic.”
To support the distribution of software in multiple languages, the text that is applied to controls is often stored in a resource file. This allows the text to be converted to a different language without requiring recompiling of the code that defines the form.
Ideally, the text for each control would occupy the same amount of space on the display regardless of the language it is written in. However, translation of the text from one language to another often involves a change in the number of characters that represent the word. As a result, a word in one language will require more display space than the same word in another language.
One technique for accommodating the increase in character length that can occur during translation of the text is to layout the form to accommodate the largest text strings of any of the languages that will be used in the form. This is undesirable because it requires the developer to consider every language that the form may be used in and it results in a form that has a great deal of wasted space.
Another technique for handling changes in text sizes due to translations is to change the layout of each form for each language so that the form is optimized for each language. For applications that have a large number of forms, this involves a great deal of work in order to make the application available for a large number of languages.
A third technique is to build a custom layout engine for the form that will move controls within the form based on the size of the text associated with the controls. The parameters for controlling this change in the layout are programmed and compiled with the form. As a result, it is very difficult to change the alignment and growth properties that are used by the automatic layout process. In particular, in order to change the layout formed by the automatic layout engine, the alignment and growth properties associated with various controls on the form must be changed in the programming source code for the form. This source code is then recompiled and re-tested. This is time consuming and requires expertise in the programming source code.
Thus, it is desirable to have a system that allows for automatic layout of forms to accommodate different text lengths due to language translations while at the same time facilitating changes in how the automatic layout is performed without requiring recompiling of the source code for the form.